﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace UserInterface.UserControls
{
    /// <summary>
    /// Interaction logic for testuc.xaml
    /// </summary>
    public partial class testuc : UserControl
    {
        public testuc()
        {
            InitializeComponent();

            Canvas cvs = new Canvas();
            cvs.Background = Brushes.AliceBlue;

            cvs.Height = this.Height * 0.9;
            cvs.Width = this.Width * 0.9;

            Rectangle rec;
            rec = new Rectangle();
            rec.Fill = Brushes.Red;

            rec.Visibility = System.Windows.Visibility.Visible;

            TextBlock txt1 = new TextBlock();
            txt1.FontSize = 14;
            txt1.Text = "Hello World!";
            Canvas.SetTop(txt1, 100);
            Canvas.SetLeft(txt1, 10);

            Grid grid = new Grid();
            grid.Height = cvs.Height;
            grid.Width = cvs.Width;
            grid.ShowGridLines = true;
            grid.ColumnDefinitions.Add(new ColumnDefinition());
            grid.ColumnDefinitions.Add(new ColumnDefinition());
            grid.RowDefinitions.Add(new RowDefinition());
            grid.RowDefinitions.Add(new RowDefinition());
            Canvas.SetLeft(grid, 0);
            Canvas.SetTop(grid, 0);

            Button b = new Button();
            b.Height = this.Height;
            b.Width = this.Width;
            Canvas.SetTop(b, 0);
            Canvas.SetLeft(b, 0);

            cvs.Children.Add(grid);

            this.Content = cvs;
        }
    }
}
